public class Fibonacci {
	public static void main(String[] args) {
		getFibonacci(50);
	}
	public static int[] getFibonacci(int d) {
		int fib[] = new int[d];
		fib[0] = 0;
		fib[1] = 1;
		for (int i = 2; i < fib.length; i++)
			fib[i] = fib[i - 1] + fib[i - 2];
		for (int i = 0; i < fib.length; i++)
			System.out.print(fib[i] + " ");
		System.out.println();
		return fib;
	}
}
